const sequelize = require("../db");
const { DataTypes } = require("sequelize");

const Message = sequelize.define("Message", {
    nickname: {
        allowNull: false,
        type: DataTypes.STRING,
    },
    createDate: {
        allowNull: false,
        type: DataTypes.BIGINT
    },
    content: {
        allowNull: false,
        type: DataTypes.STRING
    },
    avatar: {
        allowNull: false,
        type: DataTypes.STRING
    }
}, {
    freezeTableName: true,
    createdAt: false,
    updatedAt: false
});

module.exports = Message;
